package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.dto.req.StoreEvaluateSaveReq;
import com.sikaryofficial.backend.domain.dto.resp.StoreListDTO;
import com.sikaryofficial.backend.domain.entity.Store;
import com.sikaryofficial.backend.domain.entity.StoreEvaluate;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 店铺实体映射
 * @date : 2023/11/06 10:45
 */
@Mapper
public interface StoreMapping {

    StoreMapping INSTANCE = Mappers.getMapper(StoreMapping.class);

    /**
     * 把实体对象 转为entity
     * @param pointsDetailDTO 实体对象
     * @return DTO对象
     */
    StoreListDTO coverDtoToEntity(Store pointsDetailDTO);

    /**
     *  req转换为Entity
     * @param objectSharedSaveReq
     * @return
     */
    Store coverStoreToRequest(StoreEvaluateSaveReq objectSharedSaveReq);

    /**
     *  req转换为Entity
     * @param objectSharedSaveReq
     * @return
     */
    StoreEvaluate coverObjectSharedToReq(StoreEvaluateSaveReq objectSharedSaveReq);
    /**
     * 集合对象转换
     *
     * @param pointsDetailDTO 实体对象集合
     * @return DTO对象集合
     */
    List<StoreListDTO> coverDtoListToEntity(List<Store> pointsDetailDTO);
}
